From 449a4e354af82a2412cfb1ee2fe26451631aeae6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Thu, 13 Nov 2025 20:01:04 +0100 Subject: [PATCH] status/powerProfiles: Indicate non-default power mode in top bar It is quite easy to switch the power profile for some specific purpose, and then forgetting to change it back and experiencing unexpected performance behavior later. To help with that, indicate the active power profile in the top bar if it diverges from the default 'balanced' one. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7440 Part-of: --- js/ui/status/powerProfiles.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/ui/status/powerProfiles.js b/js/ui/status/powerProfiles.js index ebaf1f8ea..60ed2fd72 100644 --- a/js/ui/status/powerProfiles.js +++ b/js/ui/status/powerProfiles.js @@ -136,6 +136,17 @@ class Indicator extends SystemIndicator { _init() { super._init(); - this.quickSettingsItems.push(new PowerProfilesToggle()); + this._indicator = this._addIndicator(); + + this._powerProfilesToggle = new PowerProfilesToggle(); + + this._powerProfilesToggle.bind_property('icon-name', + this._indicator, 'icon-name', + GObject.BindingFlags.SYNC_CREATE); + this._powerProfilesToggle.bind_property('checked', + this._indicator, 'visible', + GObject.BindingFlags.SYNC_CREATE); + + this.quickSettingsItems.push(this._powerProfilesToggle); } }); -- 2.39.5